home *** CD-ROM | disk | FTP | other *** search
- unit HintEg1U;
-
- interface
-
- uses
- SysUtils, Windows, Messages, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ComCtrls;
-
- type
- TForm1 = class(TForm)
- StatusBar1: TStatusBar;
- Edit1: TEdit;
- Button1: TButton;
- CheckBox1: TCheckBox;
- Label1: TLabel;
- Memo1: TMemo;
- RadioButton1: TRadioButton;
- chkSimpleText: TCheckBox;
- procedure FormCreate(Sender: TObject);
- procedure chkSimpleTextClick(Sender: TObject);
- private
- { Private declarations }
- public
- procedure AppHint(Sender: TObject);
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.AppHint(Sender: TObject);
- begin
- { Write current component hint on status bar }
- if StatusBar1.SimplePanel or (StatusBar1.Panels.Count = 0) then
- StatusBar1.SimpleText := Application.Hint
- else
- StatusBar1.Panels[0].Text := Application.Hint
- end;
-
- procedure TForm1.FormCreate(Sender: TObject);
- begin
- Application.OnHint := AppHint
- end;
-
- procedure TForm1.chkSimpleTextClick(Sender: TObject);
- begin
- StatusBar1.SimplePanel := chkSimpleText.Checked
- end;
-
- end.
-